<html>
 <head>
   <meta name="layout" content="main" />
 </head>
 <body>
  <div class="nav">
   <ul>
    <li><a href="${createLink(uri:'/buscador/buscador') }">HOME</a></li>
    <li><g:link action="create">Nuevo Artículo</g:link> </li>    
   </ul>
  </div>
  <div>
    <h6>Listo de Artículos</h6>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:if test="${articuloInstanceList}">
     <table id="dataTableWithOutSearch" cellpadding="0" class="table table-striped table-bordered dataTable">
       <thead>
         <tr>
          <th>Código</th>
          <th>Descripción</th>
          <th>Fraccionable</th>
          <th>Costo Fracción</th>
          <th>Precio Fracción</th>
          <th>Ganancia Fracción</th>                                                  
          <th>Costo Completo</th>          
          <th>Precio Completo</th>          
          <th>Ganancia Completo</th>          
         </tr>
       </thead>
       <tbody>
        <g:each var="articuloInstance" status="i" in="${articuloInstanceList}">
	         <tr class="${(i % 2) == 0 ? 'even' : 'odd' }">
	          <td><g:link action="show" id="${articuloInstance.id}" >
	              ${fieldValue(bean : articuloInstance, field:"tipo.codigo") }-
	          <g:formatNumber number="${fieldValue(bean : articuloInstance, field:"numeroArticulo")}" 
	          format="#" groupingUsed="true"/>
	          </g:link></td>
	          <td>${fieldValue(bean : articuloInstance, field:"descripcion") }</td>
	          <td>${fieldValue(bean : articuloInstance, field:"fraccionable") }</td>
	          <td>${fieldValue(bean : articuloInstance, field:"costoFraccion") }</td>
	          <td>${fieldValue(bean : articuloInstance, field:"precioFraccion") }</td>
	          <td>${fieldValue(bean : articuloInstance, field:"tipo.codigo") }</td>
	          <td>${fieldValue(bean : articuloInstance, field:"costoCompleto") }</td>
	          <td>${fieldValue(bean : articuloInstance, field:"precioCompleto") }</td>
	          <td>${fieldValue(bean : articuloInstance, field:"tipo.codigo") }</td>	          	          	          	          	          	          	          	          
	         </tr>
        </g:each>
       </tbody>
     </table>
    </g:if>
  </div>
 </body>
</html>